package com.zy.ai.langgraph4j.node;

import lombok.extern.slf4j.Slf4j;
import org.bsc.langgraph4j.action.AsyncNodeAction;
import org.bsc.langgraph4j.prebuilt.MessagesState;

import java.util.HashMap;

import static org.bsc.langgraph4j.action.AsyncNodeAction.node_async;

/**
 * @BelongsProject: SmartBidAI
 * @BelongsPackage: com.zy.ai.langgraph4j.node
 * @Author: zhangyan
 * @CreateTime: 2025-09-03  21:12
 * @Description: TODO
 * @Version: 1.0
 */
@Slf4j
public class PbbfNode {

    public static AsyncNodeAction<MessagesState<String>> create() {
        return node_async(state -> {
            log.info("执行评标办法节点");

            // 生成评标办法内容
            String content = "这是自动生成的评标办法示例：\n1. 技术评分\n2. 商务评分\n3. 综合加权";

            // 返回 Map，key 对应节点名
            HashMap<String, Object> result = new HashMap<>();
            result.put("evaluation_method", content);

            return result;
        });
    }
}

